<template>
    <el-select v-model="form[item.name]" :multiple="item.options.multiple ? item.options.multiple : false
        " :placeholder="item.placeholder ? item.placeholder : '请选择'" clearable filterable collapse-tags
        :max-collapse-tags="2" :size="item.size" :disabled="item.disabled" :multiple-limit="item.options.limit"
        style="width: 100%" @change="handleFieldChange">
        <el-option v-for="option in item.options.items" :key="option.value" :label="option.label"
            :value="option.value"></el-option>
    </el-select>
</template>
<script setup>
import { ref, defineModel } from 'vue'
const form = defineModel()
const props = defineProps({
    item: { type: Object, default: () => { } }
})
</script>
